Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect dangerous reference changes in TryDeserialize() #171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

francoisvn
Copy link

It's easy to accidentally do something like instance = new Thing() in TryDeserialize(), but that can break silently if you have any cyclic references. This will try to detect that and complain.

Should this be a warning instead of failure? If there are any cyclic references then it could be a nasty silent failure, but if not then there's no issue. Only doing the detection if IsObjectDetection() would severely limit the coverage of this test, but maybe that could determine warning vs failure? Feels like I might be overthinking, so submitting this for now.

Maybe a kinder soul will write a unit test for this. Not sure I'm that soul

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant